{% load staticfiles %}
{% load feiuauth_tags %}
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
{#    <link rel="icon" href="../../favicon.ico">#}

    <title>{% block title %}首页{% endblock %}</title>
  {% block css %} {% endblock %}

    <!-- Bootstrap core CSS -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="/static/bootstrap-3.3.7/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/static/bootstrap-3.3.7/css/starter-template.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="/static/bootstrap-3.3.7/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  <style>
      .navbar-right {
    margin-right: 15px;
}
  </style>

  </head>

  <body>
 <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">用户管理中心</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#">功能一</a></li>
            <li><a href="#">功能二</a></li>

            {% if request.session.is_login  %}
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">当前用户：{{ request.session.user_name }}<span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">用户信息</a></li>
                            {% get_user request.session.user_name as users %}
                            <li role="separator" class="divider"></li>
                            <li class="dropdown-header">当前用户：{{ request.session.user_name }}</li>
                            <li><img src="/media/{{ users.avatar|safe}}" width="130px" href="130px"></li>
                             <li><a href="{% url 'pwd_reset' %}">修改密码</a></li>
                            <li><a href="{% url 'logout' %}">退出登录</a></li>
                        </ul>
                    </li>
                {% else %}
                    <li><a href="{% url 'login' %}">点击登录</a></li>
                {% endif %}

          </ul>
          <form class="navbar-form navbar-right">
            <input type="text" class="form-control" placeholder="Search...">
          </form>
        </div>
      </div>
    </nav>
{#    <nav class="navbar navbar-inverse navbar-fixed-top">#}
{#      <div class="container">#}
{#        <div class="navbar-header">#}
{#          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">#}
{#            <span class="sr-only">Toggle navigation</span>#}
{#            <span class="icon-bar"></span>#}
{#            <span class="icon-bar"></span>#}
{#            <span class="icon-bar"></span>#}
{#          </button>#}
{#          <a class="navbar-brand" href="#">用户平台</a>#}
{#        </div>#}
{#        <div id="navbar" class="collapse navbar-collapse">#}
{#          <ul class="nav navbar-nav">#}
{#           <li class="active"><a href="/">首页</a></li>#}
{#              {% if request.session.is_login %}#}
{#                  <li><a href="#">当前在线：{{ request.session.user_name }}</a></li>#}
{#                  <li><a href="/logout/">登出</a></li>#}
{#              {% else %}#}
{#                  <li><a href="/login/">登录</a></li>#}
{#                  <li><a href="/register/">注册</a></li>#}
{#              {% endif %}#}
{#          </ul>#}
{#        </div><!--/.nav-collapse -->#}
{#      </div>#}
{#    </nav>#}

    <div class="container">
        {% block content %}


      <div class="starter-template">
        <h1>Bootstrap starter template</h1>
        <p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>
      </div>
        {% endblock %}
    </div><!-- /.container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="/static/bootstrap-3.3.7/js/ie10-viewport-bug-workaround.js"></script>
  {% block js %}
  {% endblock %}
  </body>
</html>